package com.kky.pp.activity.tab

import androidx.fragment.app.Fragment
import com.kky.pp.R
import com.kky.pp.activity.wlm.WhoLikeMeFragment
import com.kky.pp.activity.index.IndexFragment
import com.kky.pp.activity.me.MeFragment
import com.n_add.android.model.BottomTabModel
import io.rong.imkit.conversationlist.ConversationListFragment

object TabHelper {
    /**
     * 获取要初始化的fragment
     *
     * @return fragments
     */
    fun getFragmentList(): List<Fragment> {
        val fragments: MutableList<Fragment> = ArrayList()
        fragments.add(IndexFragment())
        fragments.add(WhoLikeMeFragment())
        fragments.add(ConversationListFragment())
        fragments.add(MeFragment())
        return fragments
    }

    fun getBottomTabModelList(): MutableList<BottomTabModel> {
        val bottomTabModelList = mutableListOf<BottomTabModel>()
        bottomTabModelList.add(
            BottomTabModel(
                selected = true,
                selectedIcon = R.mipmap.tab_index_select,
                selectedUnIcon = R.mipmap.tab_index_unselect
            )
        )
        bottomTabModelList.add(
            BottomTabModel(
                selected = false,
                selectedIcon = R.mipmap.tab_wlm_select,
                selectedUnIcon = R.mipmap.tab_wlm_unselect
            )
        )
        bottomTabModelList.add(
            BottomTabModel(
                selected = false,
                selectedIcon = R.mipmap.tab_im_select,
                selectedUnIcon = R.mipmap.tab_im_unselect
            )
        )
        bottomTabModelList.add(
            BottomTabModel(
                selected = false,
                selectedIcon = R.mipmap.tab_me_select,
                selectedUnIcon = R.mipmap.tab_me_unselect
            )
        )
        return bottomTabModelList
    }
}